package com.xiaofan.service;

import com.xiaofan.bean.User;
import com.xiaofan.mapper.UserLogin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author: 晓帆
 * @description:
 * @create: 2021-06-30 14:35
 **/
@Service
public class UserServiceImp implements UserService{
  @Autowired
  UserLogin userLogin;
    @Override
    public Integer selectMoney(String name) {
      Integer money = userLogin.selectByName(name);
      return money;
    }

  @Override
  public Integer registerByUser(User user) {
    Integer insertStete = userLogin.insertByUser(user);
    return insertStete;
  }

  @Override
  public Integer updateByUser(User user) {
    Integer updateState = userLogin.updateByUser(user);

    return updateState;
  }
}
